Skip to content

Conversation

@drgrice1
Copy link
Member

Basically, anytime that reduced scoring is not enabled or if it is but it is before the reduced scoring period, then the sub_status needs to also be set to the same thing as the status. Otherwise the "unreduced" score will not be computed correctly. So the problem graders now take this into account.

This fixes issue #2873.

@drgrice1
Copy link
Member Author

Perhaps this should be considered for a hotfiix.

@drgrice1
Copy link
Member Author

Also note that achievement item usage does not need a fix here. Achievement items already set the sub_status regardless of the reduced scoring status.

@drgrice1 drgrice1 force-pushed the bugfix/grader-save-sub-status branch from 1e1bf20 to 0ba60d9 Compare December 31, 2025 19:56
Basically, anytime that reduced scoring is not enabled or if it is but
it is before the reduced scoring period, then the sub_status needs to
also be set to the same thing as the status.  Otherwise the "unreduced"
score will not be computed correctly.  So the problem graders now take
this into account.

This fixes issue openwebwork#2873.
@drgrice1 drgrice1 force-pushed the bugfix/grader-save-sub-status branch from 0ba60d9 to 81dc61b Compare January 1, 2026 19:57
@Alex-Jordan
Copy link
Contributor

I set out to test this, starting out by going to the develop branch (on both pg and sebwork2). I wanted to repeat the issue first. For both repos, I ran npm ci, and then restarted webwork2.

But now when I click to Save the score I enter, I get an error message

Error saving score.
Unknown server communication error.

This is any time I try to use the grader, not just the conditions from #2873. Are you still able to produce the original issue on develop? Does this other error arise for you?

@Alex-Jordan
Copy link
Contributor

I must be having some other issue. The library browser is all messed up too, not rendering problems.

@somiaj
Copy link
Contributor

somiaj commented Jan 3, 2026

Do you have a configuration issue with your development server (maybe the rpc isn't trying to talk to the right location?)

@drgrice1
Copy link
Member Author

drgrice1 commented Jan 3, 2026

Do you have perlcritic installed? That is a new dependency due to the merge of the pg critic pull requests. I tested the develop branch on my remove production server and had the same issue, and the reason was that I did not have perlcritic installed. On Ubuntu install the libperl-critic-perl package. I don't think you use Ubuntu, so you will need to figure out the package for your distribution (Oracle I beleive?) or install from cpan. The perl module is Perl::Critic.

Note that the server will work without having the package installed, but the webwork web service will fail to compile, particularly the WebworkWebservice::ProblemActions module, since it depends on the WeBWorK::PG::Critic package which uses the Perl::Critic module.

We need to remember to add this to the installation instructions and release notes.

@drgrice1
Copy link
Member Author

drgrice1 commented Jan 3, 2026

Note that the PPI package is also needed, but if you install Perl::Critic that should also be installed. It is a dependency of Perl::Critic.

@drgrice1
Copy link
Member Author

drgrice1 commented Jan 3, 2026

Also note that check_modules.pl has been updated for this.

@Alex-Jordan
Copy link
Contributor

OK, I installed perl critic (perl-Perl-Critic package with dnf). That alone did not resolve things. Now check_modules is clean. But if I try to save a grade using the grader, I get the same error as before. And possibly new (or not) if I then try to navigate anywhere else after triggering that error, I get Can't locate object method "INC" via package "Mojo::File" at (eval 968) line 1. . And I can't go anywhere until I restart webwork2.

I have:

   Mojolicious found and loaded
   Mojolicious::Plugin::NotYAMLConfig found and loaded
   Mojolicious::Plugin::RenderFile found and loaded

I don't find a dnf package that is specifically Mojo::File. There is perl-Mojolicious, which is already installed. And I tried sudo cpanm Mojo::File and also get that this is already installed.

And also I found the perl-PPI package, but it too is already installed.

I then tried sudo cpanm Perl::Critic. And then it installed the module, even though it's already there as a dnf package. But this hasn't changed anything with the behavior.

@drgrice1
Copy link
Member Author

drgrice1 commented Jan 3, 2026

The Mojo::File module is part of the Mojolicious package. You can't possibly have one without the other.

@drgrice1
Copy link
Member Author

drgrice1 commented Jan 4, 2026

This is a bit of a shot in the dark, but do you perhaps have a typo in a conf file? Perhaps something of the form $var->INC? The reason I ask is because of what your error message is saying. It says that it can't locate the object method INC for something, and it also says it is coming from an eval. The warning given is usually from attempting to call an object method on an object, and evals are mostly either from the course environment evaluating the conf files or from PG problem rendering (but this doesn't seem to be coming from PG).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants